package com.syqc.videos.real

import android.view.View 
import com.syqc.base.BaseRealFragment
import com.syqc.comlib.rx.filterFast
import com.syqc.monitor.databinding.FragSettingBinding

/**
 *@author  hfjs
 *@time   2025/1/2 9:15
 *@desc
 */
class SettingFragment(
    private val typeCallback: (type: Int) -> Unit,
    private val streamCallback: (stream: String) -> Unit
) : BaseRealFragment<FragSettingBinding>(4, FragSettingBinding::inflate) {

    override fun hide() {

    }

    override fun initView(view: View) {
        binding.rdbDefault.isChecked = true
        binding.rdbSub.isChecked = true
    }

    override fun initData() {

    }

    override fun initEvent() {
        binding.rdbDefault.filterFast {
            typeCallback(0)
        }
        binding.rdb16.filterFast {
            typeCallback(1)
        }
        binding.rdb4.filterFast {
            typeCallback(2)
        }
        binding.rdbFull.filterFast {
            typeCallback(3)
        }
        binding.rdbSub.filterFast {
            streamCallback("1")
        }
        binding.rdbMain.filterFast {
            streamCallback("0")
        }
    }
}